g_slice_free (GtkBookmark, bookmark);
}
+static void
+set_error_bookmark_doesnt_exist (GFile *file, GError **error)
+{
+ gchar *uri = g_file_get_uri (file);
+
+ g_set_error (error,
+ GTK_FILE_CHOOSER_ERROR,
+ GTK_FILE_CHOOSER_ERROR_NONEXISTENT,
+ _("%s does not exist in the bookmarks list"),
+ uri);
+
+ g_free (uri);
+}
+
static GFile *
get_legacy_bookmarks_file (void)
{
g_set_error (error,
GTK_FILE_CHOOSER_ERROR,
GTK_FILE_CHOOSER_ERROR_ALREADY_EXISTS,
- "%s already exists in the bookmarks list",
+ _("%s already exists in the bookmarks list"),
uri);
g_free (uri);
}
else
{
- gchar *uri = g_file_get_uri (file);
-
- g_set_error (error,
- GTK_FILE_CHOOSER_ERROR,
- GTK_FILE_CHOOSER_ERROR_NONEXISTENT,
- "%s does not exist in the bookmarks list",
- uri);
-
- g_free (uri);
-
+ set_error_bookmark_doesnt_exist (file, error);
return FALSE;
}
}
else
{
- gchar *uri = g_file_get_uri (file);
-
- g_set_error (error,
- GTK_FILE_CHOOSER_ERROR,
- GTK_FILE_CHOOSER_ERROR_NONEXISTENT,
- "%s does not exist in the bookmarks list",
- uri);
-
- g_free (uri);
-
+ set_error_bookmark_doesnt_exist (file, error);
return FALSE;
}
}
else
{
- gchar *uri = g_file_get_uri (file);
-
- g_set_error (error,
- GTK_FILE_CHOOSER_ERROR,
- GTK_FILE_CHOOSER_ERROR_NONEXISTENT,
- "%s does not exist in the bookmarks list",
- uri);
-
- g_free (uri);
-
+ set_error_bookmark_doesnt_exist (file, error);
return FALSE;
}